<!DOCTYPE html><html>
    <head>
        <style type="text/css">
            body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
        </style>
        <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js"
        djConfig="parseOnLoad: true">
        </script>
<script type="text/javascript" src="scripts/dojo/1.6/dojo/dojo.js"></script>

<script type="text/javascript">
//<!--
dojo.require("dijit.form.ValidationTextBox");
    dojo.require("dijit.form.Button");
    dojo.require("dijit.form.Form");
    dojo.require("dojo.parser");
dojo.addOnLoad(function() {
    dojo.forEach(zendDijits, function(info) {
        var n = dojo.byId(info.id);
        if (null != n) {
            dojo.attr(n, dojo.mixin({ id: info.id }, info.params));
        }
    });
    dojo.parser.parse();
});
var zendDijits = [{"id":"username","params":{"regExp":"^([a-zA-Z0-9_]{6,30})$","required":"true","dojoType":"dijit.form.ValidationTextBox"}},{"id":"password","params":{"regExp":"^[\\x20-\\x7E]{8,30}$","required":"true","dojoType":"dijit.form.ValidationTextBox"}},{"id":"login","params":{"required":"false","dojoType":"dijit.form.Button"}},{"id":"accval","params":{"dojoType":"dijit.form.Form"}}];
//-->
</script>

        <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"/>
</head>
    <body class="soria">
    <!--<body>-->

     
                    <script type="text/javascript">
     function sendForm() {
        var myForm = dijit.byId("myFormTwo");
        dojo.connect(myForm, "onSubmit", function(e){
            e.preventDefault();
//            if (myForm.isValid()){
            if (myForm.validate()){
                alert("Ready to submit data: "+dojo.toJson(myForm.attr("value")) );
            }
        });

        
        
    }
    dojo.addOnLoad(sendForm);

</script>

  <form dojoType="dijit.form.Form" id="myFormTwo" action="test" method="post">
<input id="username" name="username" value="" type="text">
<input id="password" name="password" value="" type="password">
<button name="login" id="login" type="submit">login</button>
</form>
<span id="response"></span>     

    </body>
</html>    
